num = int(input())
hundreds = num // 100
tens = (num // 10) % 10
units = num % 10
if num == hundreds ** 3 + tens ** 3 + units ** 3:
    print(True)
else:
    print(False)